//
// Created by Apple on 2021/5/30.
//

#include "Random.hpp"

namespace TWT {
namespace Util {

std::default_random_engine Random::engine (std::chrono::steady_clock::now().time_since_epoch().count());
std::uniform_int_distribution<uint32_t> Random::distribution(10);
std::stringstream  Random::ss_;

uint32_t Random::rand()
{
    return distribution(engine);
}

std::string Random::random()
{
    ss_.str("");
    ss_<< distribution(engine);
    return ss_.str();
}


}
}
